﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;


public partial class Events : System.Web.UI.Page
{
    public double UserID = 0;
    public string Name = "";
    public string EmailID = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["FullName"].ToString() != "" || Session["UserID"].ToString() != "" || Session["EmailID"].ToString() != "")
        {
            Name = Session["FullName"].ToString();
            UserID = Convert.ToDouble(Session["UserID"].ToString());
            EmailID = Session["EmailID"].ToString();

        }
        else
        {
            Response.Redirect("frmLogin.aspx");
        }
    }

    protected void Add_OnClick(object sender, EventArgs e)
    {

        string[] NameField = new string[9];
        string[] ValueField = new string[9];

        NameField[0] = "@EventName";
        NameField[1] = "@Description";
        NameField[2] = "@EventStartDate";
        NameField[3] = "@ChiefGuest";
        NameField[4] = "@EventType";
        NameField[5] = "@Venue";
        NameField[6] = "@StartTIme";
        NameField[7] = "@EventEndDate";
        NameField[8] = "@EndTime";
        
       
        ValueField[0] =  EventName.Text;
        ValueField[1] =  Description1.Text;
        ValueField[2] = EventStartDate.SelectedDate.ToString();
        ValueField[3] = ChiefGuest.Text;
        ValueField[4] = EventType.SelectedValue;
        ValueField[5] = Venue1.Text;
        ValueField[6] = TimePicker.SelectedDate.ToString();
        ValueField[7] = EventEndDate.SelectedDate.ToString();
        ValueField[8] = EventEndTime.SelectedDate.ToString();

        DataTable dtbl = SocialKlee.BusinessLogicLayer.BOLyer.GetDataTable("SocialKlee_InsertEvent", NameField, ValueField);
        
    }

}